The present invention relates to an entertainment apparatus capable of carrying out entertainment processing including reproduction of sounds and images based on digital information recorded on a secondary storage medium, such as a CD-ROM or DVD-ROM, and in particular, to a technique for controlling a peripheral device connected to the entertainment apparatus.
An entertainment apparatus such as an entertainment-dedicated computer for a game or the like, performs given entertainment processing cooperatively with peripheral devices, such as a controller and an external storage medium, connected thereto. Specifically, an entertainment apparatus carries out given entertainment processing based on inputs from peripheral devices such as a controller and an external storage medium, and outputs its results to a display unit such as a television receiver, and a speaker. Thus, the method of control of the peripheral devices connected to the entertainment apparatus is very important.
In general, control of the peripheral devices is achieved by part of a kernel which is a main function of an OS (operating system)
In recent years, a technique called xe2x80x9cmicrokernelxe2x80x9d has been available, wherein device drivers having program codes for controlling peripheral devices are put outside a kernel so as to enhance generality or compatibility for the peripheral devices. This microkernel technique is suitable for an entertainment apparatus that is required to receive diversified peripheral devices depending on the type of entertainment.
However, due to the high generality, the microkernel has difficulty dealing with each of the peripheral devices on a high level. As a result, its processing tends to become insufficient when an entertainment apparatus is used as a game apparatus that requires realtime processing.
On the other hand, a technique has also been available wherein a dedicated processor for controlling peripheral devices is provided in addition to a CPU that creates a kernel.
Entertainment apparatus normally have no primary mass storage mediums. In such an entertainment apparatus, program codes read from a secondary storage medium such as a CD-ROM are essential. In this case, in order to reduce the load imposed on a CPU, the entertainment apparatus is provided with, for example, an I/O (input/output) processor for performing such program code reading, decoding and expansion of the read program codes, and other processes.
In the entertainment apparatus having such an I/O processor, the I/O processor can be used as the foregoing dedicated processor for controlling peripheral devices.
In this case, however, exchange of information including program codes and necessary data is essential between the I/O processor and the CPU. As a result, the number of times that information is copied and transferred in the entertainment apparatus tends to increase, which is not preferable for an entertainment apparatus requiring high-speed processing. Further, the time that the CPU waits for the processing of the I/O processor tends to be prolonged, which also impedes high-speed processing.
Therefore, it is an object of the present invention to provide an improved technique that eliminates one or more of the disadvantages inherent in the prior art.
According to one aspect of the present invention, an entertainment apparatus is provided having storing means for storing program codes outside a kernel. When the program codes are executed, a peripheral device is made operable. The peripheral device is connected to the entertainment apparatus with device connecting means. A kernel creator for executing entertainment processing uses the peripheral device connected to the device connecting means. The kernel creator is made operable through the device connecting means. The kernel creator causes control means to execute the program codes based on a remote procedure call to make the peripheral device operable.
The remote procedure call is a technique wherein execution of part of an entertainment processing program, i.e. execution of a certain procedure included in the program, is entrusted to other execution means and the result of the execution is returned as return values as in a regular procedure call. In the present invention, the program codes for controlling the peripheral device are stored outside the kernel, and the control means (for example, a peripheral device control dedicated processor which is provided separately from a CPU) executes a certain procedure while the kernel creator executes the entertainment processing program. The control means reads the program codes and executes them to make the peripheral device operable. With this arrangement, the program codes for the peripheral device are located not only outside the kernel, but are also located outside hardware resources (e.g. CPU and memory) that are managed by the kernel. This improves the efficiency of the hardware resources to increase the processing speed of the whole apparatus. Thus, the apparatus can even achieve high-speed processing for temporary realtime processing.
Based on the remote procedure call, the kernel creator causes the control means to read the program codes from the storing means and to transfer the result of execution of the program codes through a direct memory access. Various implementations may be adopted for carrying out the direct memory access. Preferably, a queue is provided between the kernel creator and the peripheral device. The control means performs data exchange between the peripheral device and the queue based on a first direct memory access. The control means also performs data exchange between the kernel creator and the queue based on a second direct memory access which is asynchronous with the first direct memory access. With this arrangement, information may be stored on the queue even during execution of the entertainment processing.
Further, by performing the remote procedure call based on the direct memory access, information addressed to the kernel creator from the peripheral device may be directly transferred. This reduces the number of times that information is copied and transferred, which would otherwise have been a problem in the prior art.
The data exchange by the first direct memory access and the data exchange by the second direct memory access may be executed according to a communication protocol which is commonly used at least in the apparatus. With this arrangement, realtime processing is further ensured. A general purpose protocol used in the Ethernet, for example, may be used as the communication protocol. Accordingly, control of the apparatus free of a peripheral device is realized. Further, compatibility of program codes for peripheral devices is ensured.
The peripheral device may be detachably connected to the device connecting means and may include a secondary storage medium. The secondary storage medium stores data to be used upon execution of the program codes. Upon execution of the program codes, the data stored in the secondary storage medium is transferred to the kernel creator through a direct memory access.
According to another aspect of the present invention, a kernel function mechanism is provided in the entertainment apparatus for controlling a peripheral device connected to the entertainment apparatus. The entertainment apparatus has a kernel creator for executing entertainment processing using the peripheral device. The peripheral device is made operable through execution of program codes. The program codes are stored outside a kernel. The kernel creator causes control means to execute the program codes based on a remote procedure call to make the peripheral device operable.
Data transfer addressed to the kernel creator from the peripheral device may be performed by a direct memory access.
Data transfer may be performed according to a communication protocol commonly used in the apparatus.
According to another aspect of the present invention, a control method is provided for controlling a peripheral device connected to an entertainment apparatus. The entertainment apparatus comprises a kernel creator for executing entertainment processing using the peripheral device. The peripheral device is made operable through execution of program codes. The program codes are stored outside a kernel. The kernel creator causes control means to execute the program codes based on a remote procedure call to make the peripheral device operable.
Data transfer addressed to the kernel creator from the peripheral device may be performed by a direct memory access.
Data transfer may be performed according to a communication protocol commonly used in the apparatus.
According to another aspect of the present invention, an entertainment apparatus is provided comprising control means for executing program codes stored outside a kernel. A device connecting means for connecting a peripheral device makes the peripheral device operable through execution of the program codes. A kernel creator comprising a semiconductor device causes the control means to execute the program codes based on a remote procedure call to make the peripheral device operable. Entertainment processing is then executed using the kernel creator and the peripheral device.
According to another aspect of the present invention, a computer program is provided for operating, as an entertainment apparatus, a computer having control means for executing program codes stored outside a kernel. A peripheral device is connected to the computer with device connecting means. When the program codes are executed, the peripheral device is operable. The computer program causes the entertainment apparatus to cause the control means to execute the program codes based on a remote procedure call to make the peripheral device operable. Entertainment processing is then executed using the peripheral device.